package com.chagee.store.operation.common.exception;

import com.chagee.base.exception.BizExpCode;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author yhl
 * @version 1.0
 * @className BizErrorCode
 * @description 异常码
 * @date 2023/12/19 17:08:20
 */
@AllArgsConstructor
@Getter
public enum BizErrorCode implements BizExpCode {
	//系统异常
	SUCCESS("0", "处理成功"),
	HTTP_SUCCESS("0", "处理成功"),
	REQUEST_VALID_FAILED("99997", "请求参数校验失败"),
	PARAMETER_IS_NULL("99998", "入参为空"),
	FAIL("99999", "处理失败"),

	// 10880101xxxx 应用级错误
	ORDER_NOT_EXIST("10880101001", "单据不存在"),
	NOT_ACCEPTANCE_FAIL("10880101002", "本工单任务未验收完，提交失败"),
	PROCESS_EXCEL_FILE_ERROR("10880101003", "处理excel文件异常"),
	STORE_NO_FILE_ERROR("10880101004", "该门店不存在"),

	PLEASE_WAIT("10001003", "请稍候重试"),
	// 10880104xxxx 业务级错误
	CODE_GENERATE_FAIL("10880104001", "编号生成失败"),
	CHAR_FORMAT_FAIL("108801040002", "类型转换异常"),
	USER_NOT_EXIST("108801040003", "用户不存在"),
	MQ_SEND_FAIL("108801040004", "发送MQ消息失败"),
	SEND_LARK_MESSAGE_FAIL("108801040014", "飞书消息发送失败"),
	GET_LARK_OPENID_FAIL("108801040013", "获取飞书用户openId失败"),
	CLOSE_CLEAN_DISABLE("108801040015", "三方打烊已关闭"),
	DATE_CONVERT_FAIL("108801040016", "时间转换失败"),
	USER_STORE_CODE_NULL("108801040017", "获取登录人门店编码信息失败"),
	GET_USER_DETAIL_NULL("108801040018", "根据手机号或编码获取霸王功夫侧用户信息失败"),
	QUERY_USER_DETAIL_FAIL("108801040019", "该手机号用户在霸王功夫侧不存在"),
	SETTINGS_MANAGER_FAIL("108801040020", "打烊管理者配置失败!"),
	SETTINGS_CARRY_OUT_FAIL("108801040021", "打烊执行者配置失败!"),
	STORE_CONFIG_NULL("108801040022", "该门店打烊配置为空!"),

	SUPPLIER_ENTRY_BILLING_START_DATA("108802010001", "供应商进场日期/计费开始日期类型转换异常!"),
	DOWNLOAD_EXCEL_FAIL("108802010002", "创建excel异常"),
	SUBMIT_DEVICE_REPEAT("108802010015", "供应商已接单，请返回刷新"),
	ORDER_DEVICE_FAIL("108802010016", "设备运行异常,门店交接信息不可为空"),
	PARAMETER_OR_STORE_CODE_IS_NULL("108802010017", "入参对象为空或者门店编码为空!"),
	SCAN_SUCCESS("108802010018", "扫码成功!"),
	SUPPLIER_NO_TAKING_ORDERS("108802010019", "该打烊工单已被其他供应商接单!"),
	TAKING_ORDERS_SUCCESS("108802010020", "接单成功!"),
	STORE_NO_WORK_ORDER("108802010021", "该门店暂无打烊工单!"),
	WORK_ORDER_HAS_WORK_AND_NO_DEAL("108802010022", "该工单下存在未处理的任务,暂无法完成打烊任务!"),
	NO_HANDOVER("108802010023", "预打烊完成情况交接信息必填!"),
	NO_HANDOVER_CONFIRM_STATUS("108802010024", "的确认信息为空!"),
	GMV_REQUEST_IS_NULL("108802010025", "获取门店的GMV信息的入参有空值!"),
	NOT_GTE_LOGIN_USER_INFO("108802010026", "未获取到登录人信息!"),
	NOT_GTE_LOGIN_USER_JOIN_SUPPLIER_INFO("108802010027", "未获取到登录人关联的供应商信息!"),
	NOT_GTE_STORE_INFO("108802010028", "未获取门店信息!"),
	APPEAL_REVIEWER_ALREAY_EXIST("108802010029", "当前子公司下已存在该审批人!"),
	PARAMETER_OR_WORK_ORDER_NUM_IS_NULL("108802010030", "入参对象为空或者工单编码为空!"),
	WORK_ORDER_NUM_OR_STORE_TASK_RELATION_ID_OR_TASK_NAME_IS_NULL("108802010031", "工单编码或者门店打烊任务关联id或者任务名称为空!"),
	NO_TASK_EXECUTION_DATA("108802010032", "未查询到工单任务信息！"),
	LOCK_EXCEPTION("108802010033", "处理失败,请稍后再试!"),
	NO_WORK_ORDER_DATA("108802010034", "未查询到工单信息！"),
	PARAMETER_USER_NAME_IS_NULL("108802010035", "userName不能为空！"),
	COMMENT_IS_NULL("108802010036", "评价项类型未匹配到！"),
	COMMENT_QUESTION_IS_NULL("108802010037", "单选评价选项问题不能为空！"),
	NOT_GTE_COMMENT_INFO("108802010038", "单选评价选项问题不能为空！"),
	ORDER_STATUS_FAIL("108802010039", "工单状态已变更，请返回刷新"),
	ORDER_ACCEPTANCE_FAIL("108802010040", "工单已提交验收，请返回刷新"),
	NO_ACCOUNT_FAILED("108802010041", "金额为空，无法支付。"),
	NO_TRADING_CODE_FAILED("108802010042", "未生成交易单号，支付失败。"),
	NOTICE_FAILED("108802010043", "调用失败。"),
	EXPLAIN_DATE_NO_WORK_ORDER("108802010044", "申述当日暂无打烊工单!"),
	EXPLAIN_DATE_EXIST_WORK_ORDER("108802010045", "该申述工单当日已有打烊完成工单!"),
	NO_CLOSING_TASK_ORDER("108802010046", "该门店未开启三方打烊功能!"),
	HANDLE_OVERTIME_FAIL("108802010047", "处理申诉已过有效时间!"),
	APPEAL_OVERTIME_FAIL("108802010048", "申诉已过有效时间!"),
	EXPORT_DATE_FAIL("108802010049", "导出时间范围不可为空!"),
	EXPORT_DISTANCE_DATE_FAIL("108802010050", "导出时间范围不能超过一个月"),
	NO_NORMAL_SUPPLIER_FAIL("108802010051", "当前接单用户不属于该门店工单配置的供应商，请联系管理员"),
	APPEAL_REJECTED_FAIL("108802010052", "申诉已被驳回,不可再次发起申诉!"),
	EXSIST_PROCESSING_WORK_ORDER("108802010053", "存在处理中的工单，无法创建!"),
	EXTRA_CONVERT_EXCEPTION("99999","拓展字段转换异常！"),

	// 百度AI检测异常定义
	IDENTIFY_PERISTALTIC_PUMP_FAIL_1("108802010039", "请求成功，蠕动泵清洁检测任务，图像不合格，图像模糊！"),
	IDENTIFY_PERISTALTIC_PUMP_FAIL_2("108802010040", "请求成功，蠕动泵清洁检测任务，图像不合格，无蠕动泵！"),
	IDENTIFY_PERISTALTIC_PUMP_FAIL_3("108802010041", "请求成功，蠕动泵清洁检测任务，图像不合格，有茶渍、水渍、奶渍、积垢等污渍！"),

	IDENTIFY_AIR_OUTLET_FAIL_1("108802010042", "请求成功，出风口清洁检测任务，图像不合格，图像模糊！"),
	IDENTIFY_AIR_OUTLET_FAIL_2("108802010043", "请求成功，出风口清洁检测任务，图像不合格，无出风口！"),
	IDENTIFY_AIR_OUTLET_FAIL_3("108802010044", "请求成功，出风口清洁检测任务，图像不合格，有茶渍、水渍、奶渍、积垢等污渍！"),

	IDENTIFY_ICE_BLANC_MILK_BOX_FAIL_1("108802010045", "请求成功，牛奶冰勃朗清洁检测任务，图像不合格，图像模糊！"),
	IDENTIFY_ICE_BLANC_MILK_BOX_FAIL_2("108802010046", "请求成功，牛奶冰勃朗清洁检测任务，图像不合格，有茶渍、水渍、奶渍、积垢等污渍！"),

	IDENTIFY_OUTLET_CLING_FILM_FAIL_1("108802010047", "请求成功，出料口清洁检测任务，图像不合格，图像模糊"),
	IDENTIFY_OUTLET_CLING_FILM_FAIL_2("108802010048", "请求成功，出料口清洁检测任务，图像不合格，图像角度不合格"),
	IDENTIFY_OUTLET_CLING_FILM_FAIL_3("108802010049", "请求成功，出料口清洁检测任务，图像不合格，无出料口"),
	IDENTIFY_OUTLET_CLING_FILM_FAIL_4("108802010050", "请求成功，出料口清洁检测任务，图像不合格，出料口未覆盖保鲜膜"),
	IDENTIFY_OUTLET_CLING_FILM_FAIL_5("108802010051", "请求成功，出料口清洁检测任务，图像不合格，出料口有茶渍、水渍、奶渍、积垢等污渍"),

	IDENTIFY_PARAM_ERROR("108802010052", "请求失败，输入参数错误！"),
	IDENTIFY_NOT_FOUND("108802010053", "请求失败，NotFound！"),
	IDENTIFY_IMAGE_INVALID("108802010054", "请求失败，输入图像无效！"),
	IDENTIFY_INTERNAL_ERROR("108802010055", "请求失败，内部服务错误！"),

	UPLOAD_INVOICE_ERROR("108802010056", "创建上传发票失败"),
	VISA_VERIFICATION_ERROR("108802010057", "验签失败"),
	INVOKE_SUPPLIER_ERROR("108802010058", "调用供应商接口获取供应商信息失败"),
	SUPPLIER_LOCK_TAXNO_ERROR("108802010059", "供应商缺少税号，请联系管理员补充"),
	PURCHASER_LOCK_TAXNO_ERROR("108802010060", "购方缺少税号，请联系管理员补充"),
	SUPPLIER_ENTRY_ERROR("108802010061", "该供应商信息不存在"),
	PUSH_FINANCE_ERROR("108802010062", "推送财务系统失败"),
	YUNLI_RATEPAYER_ERROR("108802010063", "云砺发票信息纳税人字段异常"),
	LOGIN_USER_UNAUTHORIZED_OPERATION_ERROR("108802010064", "当前登录人无权限操作,请联系管理员"),
	ORDER_STATUS_ERROR("108802010065", "选择的单据状态不符合下发操作"),
	CONFIG_NOT_ERROR("108802010066", "配置数据不存在"),
	ADVANCE_PAYMENT_CREATE_FAILED("108802010067", "调用钱包创建交易单失败"),
	OFFLINE_PAY_FAILED("108802010068", "调用钱包线下支付接口失败"),
	OFFLINE_PAY_CONFIRM_FAILED("108802010069", "调用钱包线下支付确认接口失败"),
	PAY_OFFLINE_FAILED("108802010070", "支付途径已变更，请返回刷新"),

	SEND_MQ_FAIL("108801040004", "发送MQ消息失败"),

	;


	private final String errorCode;
	private final String errorMsg;
}
